package com.tencent.sr.iris.activity.interfaces.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 */
@AllArgsConstructor
@Getter
public enum ActivityEventTypeEnum {
    /**
     * 佣金变更
     */
    COMMISSION_CHANGE("COMMISSION_CHANGE", "佣金变更"),
    SHARETIME_CHANGE("SHARETIME_CHANGE", "有效分享次数变更"),
    BECOME_TRAINEE("BECOME_TRAINEE", "成为见习"),
    LEVEL_UP("LEVEL_UP", "用户升级"),
    SUPERVISOR_CHANGE("SUPERVISOR_CHANGE", "上级变更"),
    SPECIAL_INVITE("SPECIAL_INVITE", "用户打特邀标"),
    USER_OPEN_MINI_PROGRAM("USER_OPEN_MINI_PROGRAM", "用户打开小程序"),
    DISTRIBUTION_ORDER("DISTRIBUTION_ORDER", "分佣单"),

    /**
     * 月月领
     */
    MONTH_GIFT_JOB("MONTH_GIFT_JOB", "月月领")
    ;

    final String code;
    final String desc;

    public static ActivityEventTypeEnum getByCode(String code) {
        for (ActivityEventTypeEnum staff : ActivityEventTypeEnum.values()) {
            if (staff.getCode().equals(code)) {
                return staff;
            }
        }
        return null;
    }
}
